#ifndef CAMERA_H
#define CAMERA_H

#include "Frustum.h"

namespace devii
{

class Camera : public Frustum
{
public:
	Camera();
	~Camera();

	void			update();
	void			rotateCamera( float pAngle, float hAngle, float rAngle );
	void			move( float d );
	void			strafe( float d );

	//Get-functions
	float3			getPosition();
	D3DXMATRIX		getView();
	D3DXMATRIX		getViewProjection();
	matrix			getWorld() const;
	matrix  	    getFrustum();

	float			getHead();
	float			getPitch();
	float			getRoll();
	//Set-functions
	void			setHeight( float y );		//Sets the y-coordinate of m_position, must be called after update though.
	void			setPosition( float3 pos );
	void			setAngles( float head, float pitch, float roll );
	void			setWorld( const matrix & world );

private:

	float3 up;
	float3 right;
	float3 look;
	
	float3 firstUp;
	float3 firstRight;
	float3 firstLook;

	float3 position;
	float3 dislocation;
	float pitch;
	float head;
	float roll;

	D3DXMATRIX	view;
	D3DXMATRIX	rotationMatrix;
	matrix world;
};

}
#endif